package com.gel.aiagent.convention.result;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
@Data
@Accessors(chain = true)//用于链式生成的注解
public class Result<T> implements Serializable {
    private static final long serialVersionUID = 1L;
    /*正确返回码*/
    public static final String SUCCESS_CODE = "0";
    /*返回码*/
    private String code;
    /*返回信息*/
    private String message;
    /*响应数据*/
    private T data;
    /*请求id*/
    private String requestId;


    public boolean isSuccess(){
        return SUCCESS_CODE.equals(code);
    }

}
